The ``Program Feature''

Lisp implementations since Lisp 1.5 have had what was originally called ``the program feature,'' as if it were impossible to write programs without it! The <#2704#>prog<#2704#> construct allows one to write in an Algol-like or Fortran-like statement-oriented style, using <#2705#>go<#2705#> statements that can refer to tags in the body of the <#2706#>prog<#2706#>. Modern Lisp programming style tends to use <#2707#>prog<#2707#> rather infrequently. The various iteration constructs, such as <#2708#>do<#2708#>, have bodies with the characteristics of a <#2709#>prog<#2709#>. (However, the ability to use <#2710#>go<#2710#> statements within iteration constructs is very seldom called upon in practice.)

Three distinct operations are performed by <#2711#>prog<#2711#>: it binds local variables, it permits use of the <#2712#>return<#2712#> statement, and it permits use of the <#2713#>go<#2713#> statement. In Common Lisp, these three operations have been separated into three distinct constructs: <#2714#>let<#2714#>, <#2715#>block<#2715#>, and <#2716#>tagbody<#2716#>. These three constructs may be used independently as building blocks for other types of constructs.


#defspec2717#


#defmac2770#


#defspec2863#